-
Notifications
You must be signed in to change notification settings - Fork 92
feat: add __repr__ method to CustomFee base class for better debugging #604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add __repr__ method to CustomFee base class for better debugging #604
Conversation
Add __repr__ method to CustomFee base class displaying fee_collector_account_id and all_collectors_are_exempt for improved debugging experience. - Add __repr__ method to CustomFee base class - Add unit test for __repr__ method - Add CHANGELOG entry Signed-off-by: prakharjain <[email protected]>
|
@exploreriii Please have a look into this.. I made the required changes |
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much, did you also need to change the exmaple?
No, I didnt change the examples. Is there something I need to do.. if so please let me know |
|
Thanks, I'll take a look. Sorry it will take some time But i note your commits also are not verified and they must be able to memerged |
No I mean I wanted the reviews before October end so that it can be counted in hacktober.. So thats why |
|
Yes but we have other hacktoberfest review requests before you, which is the issue |
Okay.. Please try to do it as soon as possible.. also is there something I can do to make it faster? |
|
This issue you chose takes longer to review because it impacts core sdk functionality, rather than just examples or docstrings. Sorry, it needs to take the time it needs |
|
Okay sure |
|
Hi @PrakharJain1509 |
Signed-off-by: Prakhar Jain <[email protected]>
|
@exploreriii Just check now.. got a small issue on PR Formatting |
Signed-off-by: prakharjain <[email protected]>
9ba0c1a to
73d80fb
Compare
|
@exploreriii Okay done now.. |
|
@exploreriii please let me know if anything else is required. |
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @PrakharJain1509 I didn't see any changes?
Please note half of your commits are not verified, you must ensure each commit has
git commit -S -s -m "chore: your commit message"
|
Hi @PrakharJain1509 |
|
Hi @PrakharJain1509 , this PR is a dependency on another PR, could you confirm if you are planning on continuing to work on this, or if we can take it on building on your work? |
|
Closing PR and re-assigning as is inactive for now |

Description
Adds
__repr__methods to the CustomFee base class and all subclasses (CustomFixedFee, CustomFractionalFee, CustomRoyaltyFee) to improve debugging by displaying key attributes.Changes
__repr__method toCustomFeebase class showingfee_collector_account_idandall_collectors_are_exempt__repr__method toCustomFixedFeeshowing amount, denominating_token_id, fee_collector_account_id, and all_collectors_are_exempt__repr__method toCustomFractionalFeeshowing numerator, denominator, min/max amounts, assessment_method, fee_collector_account_id, and all_collectors_are_exempt__repr__method toCustomRoyaltyFeeshowing numerator, denominator, fallback_fee, fee_collector_account_id, and all_collectors_are_exempttest_custom_fee.pyandtest_custom_fee_limit.pyto verify repr functionalityexamples/custom_fee.pyto demonstrate repr outputTesting
Added comprehensive unit tests verifying the repr output for all custom fee types including edge cases (None values, missing collectors, etc.).
Example Output
When debugging
CustomFixedFee, the output will now show:Instead of the generic
<hiero_sdk_python.tokens.custom_fixed_fee.CustomFixedFee object at 0x...>representation.Fixes: #583